API Documentation
Quaternion.h
1 // Quaternion.h
3 //
5 
6 namespace nkMaths
7 {
13  class Quaternion : public Vector
14  {
15  public :
16 
30  Quaternion (float x, float y, float z, float w) ;
37  Quaternion (const Vector& axis, float angle) ;
43  Quaternion (const Vector& eulerAngles) ;
49  Quaternion (const Matrix& mat) ;
55  Quaternion (const Quaternion& other) ;
60 
65 
72  void setFromAxisAngle (const Vector& axis, float angle) ;
78  void setFromEuler (const Vector& angles) ;
84  void setFromMatrix (const Matrix& mat) ;
85 
86  // Transformations
94  Vector transform (const Vector& vector) const ;
95 
96  // Operators
109  Quaternion operator* (const Quaternion& other) const ;
115  void operator*= (const Quaternion& other) ;
116  } ;
117 }
nkMaths::Quaternion::operator*=
void operator*=(const Quaternion &other)
nkMaths::Quaternion::~Quaternion
~Quaternion()
nkMaths
Encompasses all API of component NilkinsMaths.
Definition: IntVector.h:7
nkMaths::Quaternion
A quaternion, symbolizing rotations as a 4D vector.
Definition: Quaternion.h:14
nkMaths::Quaternion::operator=
Quaternion & operator=(const Quaternion &other)
nkMaths::Quaternion::setFromMatrix
void setFromMatrix(const Matrix &mat)
nkMaths::Quaternion::Quaternion
Quaternion(const Vector &axis, float angle)
nkMaths::Matrix
Represents a 4x4 float matrix.
Definition: Matrix.h:14
nkMaths::Quaternion::Quaternion
Quaternion(const Vector &eulerAngles)
nkMaths::Quaternion::Quaternion
Quaternion(const Quaternion &other)
nkMaths::Quaternion::setFromAxisAngle
void setFromAxisAngle(const Vector &axis, float angle)
nkMaths::Quaternion::operator*
Quaternion operator*(const Quaternion &other) const
nkMaths::Quaternion::transform
Vector transform(const Vector &vector) const
nkMaths::Quaternion::Quaternion
Quaternion(float x, float y, float z, float w)
nkMaths::Quaternion::Quaternion
Quaternion(const Matrix &mat)
nkMaths::Quaternion::getAsEulerAngles
Vector getAsEulerAngles() const
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12
nkMaths::Quaternion::Quaternion
Quaternion()
nkMaths::Quaternion::setFromEuler
void setFromEuler(const Vector &angles)